package com.xyulu.fegin;

import com.xyulu.fallback.UserFallBack;
import com.xyulu.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author luming
 * @version 1.0
 */
@FeignClient(value = "userservice", fallback = UserFallBack.class)
public interface UserClient {

    @GetMapping("/user/{id}")
    User findUserById(@PathVariable("id") Long id);


    @GetMapping("/user/break/{id}")
    String testHystrix(@PathVariable("id") Long id);
}

